<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>ImaAdsLoader.Builder (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="ImaAdsLoader.Builder (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.ext.ima</a></div>
<h2 title="Class ImaAdsLoader.Builder" class="title">Class ImaAdsLoader.Builder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.ext.ima.ImaAdsLoader.Builder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader</a></dd>
</dl>
<hr>
<pre>public static final class <span class="typeNameLabel">ImaAdsLoader.Builder</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">Builder for <a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima"><code>ImaAdsLoader</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_AD_PRELOAD_TIMEOUT_MS">DEFAULT_AD_PRELOAD_TIMEOUT_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default duration in milliseconds for which the player must buffer while preloading an ad
 group before that ad group is skipped and marked as having failed to load.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.content.Context)">Builder</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context)</code></th>
<td class="colLast">
<div class="block">Creates a new builder for <a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima"><code>ImaAdsLoader</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#build()">build</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a new <a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima"><code>ImaAdsLoader</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdErrorListener(com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener)">setAdErrorListener</a></span>&#8203;(com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener&nbsp;adErrorListener)</code></th>
<td class="colLast">
<div class="block">Sets a listener for ad errors that will be passed to <code>AdsLoader.addAdErrorListener(AdErrorListener)</code> and
 <code>BaseManager.addAdErrorListener(AdErrorListener)</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdEventListener(com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener)">setAdEventListener</a></span>&#8203;(com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener&nbsp;adEventListener)</code></th>
<td class="colLast">
<div class="block">Sets a listener for ad events that will be passed to <code>BaseManager.addAdEventListener(AdEventListener)</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdMediaMimeTypes(java.util.List)">setAdMediaMimeTypes</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;adMediaMimeTypes)</code></th>
<td class="colLast">
<div class="block">Sets the MIME types to prioritize for linear ad media.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdPreloadTimeoutMs(long)">setAdPreloadTimeoutMs</a></span>&#8203;(long&nbsp;adPreloadTimeoutMs)</code></th>
<td class="colLast">
<div class="block">Sets the duration in milliseconds for which the player must buffer while preloading an ad
 group before that ad group is skipped and marked as having failed to load.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdUiElements(java.util.Set)">setAdUiElements</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/Set.html" title="class or interface in java.util" class="externalLink" target="_top">Set</a>&lt;com.google.ads.interactivemedia.v3.api.UiElement&gt;&nbsp;adUiElements)</code></th>
<td class="colLast">
<div class="block">Sets the ad UI elements to be rendered by the IMA SDK.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCompanionAdSlots(java.util.Collection)">setCompanionAdSlots</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/Collection.html" title="class or interface in java.util" class="externalLink" target="_top">Collection</a>&lt;com.google.ads.interactivemedia.v3.api.CompanionAdSlot&gt;&nbsp;companionAdSlots)</code></th>
<td class="colLast">
<div class="block">Sets the slots to use for companion ads, if they are present in the loaded ad.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDebugModeEnabled(boolean)">setDebugModeEnabled</a></span>&#8203;(boolean&nbsp;debugModeEnabled)</code></th>
<td class="colLast">
<div class="block">Sets whether to enable outputting verbose logs for the IMA extension and IMA SDK.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEnableContinuousPlayback(boolean)">setEnableContinuousPlayback</a></span>&#8203;(boolean&nbsp;enableContinuousPlayback)</code></th>
<td class="colLast">
<div class="block">Sets whether to enable continuous playback.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFocusSkipButtonWhenAvailable(boolean)">setFocusSkipButtonWhenAvailable</a></span>&#8203;(boolean&nbsp;focusSkipButtonWhenAvailable)</code></th>
<td class="colLast">
<div class="block">Sets whether to focus the skip button (when available) on Android TV devices.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setImaSdkSettings(com.google.ads.interactivemedia.v3.api.ImaSdkSettings)">setImaSdkSettings</a></span>&#8203;(com.google.ads.interactivemedia.v3.api.ImaSdkSettings&nbsp;imaSdkSettings)</code></th>
<td class="colLast">
<div class="block">Sets the IMA SDK settings.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxMediaBitrate(int)">setMaxMediaBitrate</a></span>&#8203;(int&nbsp;bitrate)</code></th>
<td class="colLast">
<div class="block">Sets the media maximum recommended bitrate for ads, in bps.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaLoadTimeoutMs(int)">setMediaLoadTimeoutMs</a></span>&#8203;(int&nbsp;mediaLoadTimeoutMs)</code></th>
<td class="colLast">
<div class="block">Sets the ad media load timeout, in milliseconds.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPlayAdBeforeStartPosition(boolean)">setPlayAdBeforeStartPosition</a></span>&#8203;(boolean&nbsp;playAdBeforeStartPosition)</code></th>
<td class="colLast">
<div class="block">Sets whether to play an ad before the start position when beginning playback.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setVastLoadTimeoutMs(int)">setVastLoadTimeoutMs</a></span>&#8203;(int&nbsp;vastLoadTimeoutMs)</code></th>
<td class="colLast">
<div class="block">Sets the VAST load timeout, in milliseconds.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setVideoAdPlayerCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback)">setVideoAdPlayerCallback</a></span>&#8203;(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback&nbsp;videoAdPlayerCallback)</code></th>
<td class="colLast">
<div class="block">Sets a callback to receive video ad player events.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="DEFAULT_AD_PRELOAD_TIMEOUT_MS">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_AD_PRELOAD_TIMEOUT_MS</h4>
<pre>public static final&nbsp;long DEFAULT_AD_PRELOAD_TIMEOUT_MS</pre>
<div class="block">The default duration in milliseconds for which the player must buffer while preloading an ad
 group before that ad group is skipped and marked as having failed to load.

 <p>This value should be large enough not to trigger discarding the ad when it actually might
 load soon, but small enough so that user is not waiting for too long.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#setAdPreloadTimeoutMs(long)"><code>setAdPreloadTimeoutMs(long)</code></a>, 
<a href="../../../../../../constant-values.html#com.google.android.exoplayer2.ext.ima.ImaAdsLoader.Builder.DEFAULT_AD_PRELOAD_TIMEOUT_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(android.content.Context)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Builder</h4>
<pre>public&nbsp;Builder&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context)</pre>
<div class="block">Creates a new builder for <a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima"><code>ImaAdsLoader</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - The context;</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="setImaSdkSettings(com.google.ads.interactivemedia.v3.api.ImaSdkSettings)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setImaSdkSettings</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setImaSdkSettings&#8203;(com.google.ads.interactivemedia.v3.api.ImaSdkSettings&nbsp;imaSdkSettings)</pre>
<div class="block">Sets the IMA SDK settings. The provided settings instance's player type and version fields
 may be overwritten.

 <p>If this method is not called the default settings will be used.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>imaSdkSettings</code> - The <code>ImaSdkSettings</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
</dl>
</li>
</ul>
<a id="setAdErrorListener(com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAdErrorListener</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setAdErrorListener&#8203;(com.google.ads.interactivemedia.v3.api.AdErrorEvent.AdErrorListener&nbsp;adErrorListener)</pre>
<div class="block">Sets a listener for ad errors that will be passed to <code>AdsLoader.addAdErrorListener(AdErrorListener)</code> and
 <code>BaseManager.addAdErrorListener(AdErrorListener)</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adErrorListener</code> - The ad error listener.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
</dl>
</li>
</ul>
<a id="setAdEventListener(com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAdEventListener</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setAdEventListener&#8203;(com.google.ads.interactivemedia.v3.api.AdEvent.AdEventListener&nbsp;adEventListener)</pre>
<div class="block">Sets a listener for ad events that will be passed to <code>BaseManager.addAdEventListener(AdEventListener)</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adEventListener</code> - The ad event listener.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
</dl>
</li>
</ul>
<a id="setVideoAdPlayerCallback(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setVideoAdPlayerCallback</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setVideoAdPlayerCallback&#8203;(com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.VideoAdPlayerCallback&nbsp;videoAdPlayerCallback)</pre>
<div class="block">Sets a callback to receive video ad player events. Note that these events are handled
 internally by the IMA SDK and this ads loader. For analytics and diagnostics, new
 implementations should generally use events from the top-level <a href="../../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> listeners
 instead of setting a callback via this method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>videoAdPlayerCallback</code> - The callback to receive video ad player events.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>VideoAdPlayer.VideoAdPlayerCallback</code></dd>
</dl>
</li>
</ul>
<a id="setAdUiElements(java.util.Set)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAdUiElements</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setAdUiElements&#8203;(<a href="https://developer.android.com/reference/java/util/Set.html" title="class or interface in java.util" class="externalLink" target="_top">Set</a>&lt;com.google.ads.interactivemedia.v3.api.UiElement&gt;&nbsp;adUiElements)</pre>
<div class="block">Sets the ad UI elements to be rendered by the IMA SDK.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adUiElements</code> - The ad UI elements to be rendered by the IMA SDK.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRenderingSettings.setUiElements(Set)</code></dd>
</dl>
</li>
</ul>
<a id="setCompanionAdSlots(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCompanionAdSlots</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setCompanionAdSlots&#8203;(<a href="https://developer.android.com/reference/java/util/Collection.html" title="class or interface in java.util" class="externalLink" target="_top">Collection</a>&lt;com.google.ads.interactivemedia.v3.api.CompanionAdSlot&gt;&nbsp;companionAdSlots)</pre>
<div class="block">Sets the slots to use for companion ads, if they are present in the loaded ad.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>companionAdSlots</code> - The slots to use for companion ads.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>BaseDisplayContainer.setCompanionSlots(Collection)</code></dd>
</dl>
</li>
</ul>
<a id="setAdMediaMimeTypes(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAdMediaMimeTypes</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setAdMediaMimeTypes&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&gt;&nbsp;adMediaMimeTypes)</pre>
<div class="block">Sets the MIME types to prioritize for linear ad media. If not specified, MIME types supported
 by the <a href="../../source/MediaSourceFactory.html" title="interface in com.google.android.exoplayer2.source"><code>adMediaSourceFactory</code></a> used to construct the <a href="../../source/ads/AdsMediaSource.html" title="class in com.google.android.exoplayer2.source.ads"><code>AdsMediaSource</code></a> will be used.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adMediaMimeTypes</code> - The MIME types to prioritize for linear ad media. May contain <a href="../../util/MimeTypes.html#APPLICATION_MPD"><code>MimeTypes.APPLICATION_MPD</code></a>, <a href="../../util/MimeTypes.html#APPLICATION_M3U8"><code>MimeTypes.APPLICATION_M3U8</code></a>, <a href="../../util/MimeTypes.html#VIDEO_MP4"><code>MimeTypes.VIDEO_MP4</code></a>, <a href="../../util/MimeTypes.html#VIDEO_WEBM"><code>MimeTypes.VIDEO_WEBM</code></a>, <a href="../../util/MimeTypes.html#VIDEO_H263"><code>MimeTypes.VIDEO_H263</code></a>, <a href="../../util/MimeTypes.html#AUDIO_MP4"><code>MimeTypes.AUDIO_MP4</code></a> and <a href="../../util/MimeTypes.html#AUDIO_MPEG"><code>MimeTypes.AUDIO_MPEG</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRenderingSettings.setMimeTypes(List)</code></dd>
</dl>
</li>
</ul>
<a id="setEnableContinuousPlayback(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnableContinuousPlayback</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setEnableContinuousPlayback&#8203;(boolean&nbsp;enableContinuousPlayback)</pre>
<div class="block">Sets whether to enable continuous playback. Pass <code>true</code> if content videos will be
 played continuously, similar to a TV broadcast. This setting may modify the ads request but
 does not affect ad playback behavior. The requested value is unknown by default.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>enableContinuousPlayback</code> - Whether to enable continuous playback.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRequest.setContinuousPlayback(boolean)</code></dd>
</dl>
</li>
</ul>
<a id="setAdPreloadTimeoutMs(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAdPreloadTimeoutMs</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setAdPreloadTimeoutMs&#8203;(long&nbsp;adPreloadTimeoutMs)</pre>
<div class="block">Sets the duration in milliseconds for which the player must buffer while preloading an ad
 group before that ad group is skipped and marked as having failed to load. Pass <a href="../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if there should be no such timeout. The default value is <a href="#DEFAULT_AD_PRELOAD_TIMEOUT_MS">10000L</a> ms.

 <p>The purpose of this timeout is to avoid playback getting stuck in the unexpected case that
 the IMA SDK does not load an ad break based on the player's reported content position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adPreloadTimeoutMs</code> - The timeout buffering duration in milliseconds, or <a href="../../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> for no timeout.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
</dl>
</li>
</ul>
<a id="setVastLoadTimeoutMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setVastLoadTimeoutMs</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setVastLoadTimeoutMs&#8203;(int&nbsp;vastLoadTimeoutMs)</pre>
<div class="block">Sets the VAST load timeout, in milliseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vastLoadTimeoutMs</code> - The VAST load timeout, in milliseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRequest.setVastLoadTimeout(float)</code></dd>
</dl>
</li>
</ul>
<a id="setMediaLoadTimeoutMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaLoadTimeoutMs</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setMediaLoadTimeoutMs&#8203;(int&nbsp;mediaLoadTimeoutMs)</pre>
<div class="block">Sets the ad media load timeout, in milliseconds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaLoadTimeoutMs</code> - The ad media load timeout, in milliseconds.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRenderingSettings.setLoadVideoTimeout(int)</code></dd>
</dl>
</li>
</ul>
<a id="setMaxMediaBitrate(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxMediaBitrate</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setMaxMediaBitrate&#8203;(int&nbsp;bitrate)</pre>
<div class="block">Sets the media maximum recommended bitrate for ads, in bps.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bitrate</code> - The media maximum recommended bitrate for ads, in bps.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRenderingSettings.setBitrateKbps(int)</code></dd>
</dl>
</li>
</ul>
<a id="setFocusSkipButtonWhenAvailable(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFocusSkipButtonWhenAvailable</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setFocusSkipButtonWhenAvailable&#8203;(boolean&nbsp;focusSkipButtonWhenAvailable)</pre>
<div class="block">Sets whether to focus the skip button (when available) on Android TV devices. The default
 setting is <code>true</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>focusSkipButtonWhenAvailable</code> - Whether to focus the skip button (when available) on
     Android TV devices.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>AdsRenderingSettings.setFocusSkipButtonWhenAvailable(boolean)</code></dd>
</dl>
</li>
</ul>
<a id="setPlayAdBeforeStartPosition(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlayAdBeforeStartPosition</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setPlayAdBeforeStartPosition&#8203;(boolean&nbsp;playAdBeforeStartPosition)</pre>
<div class="block">Sets whether to play an ad before the start position when beginning playback. If <code>
 true</code>, an ad will be played if there is one at or before the start position. If <code>
 false</code>, an ad will be played only if there is one exactly at the start position. The default
 setting is <code>true</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playAdBeforeStartPosition</code> - Whether to play an ad before the start position when
     beginning playback.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
</dl>
</li>
</ul>
<a id="setDebugModeEnabled(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDebugModeEnabled</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.Builder.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader.Builder</a>&nbsp;setDebugModeEnabled&#8203;(boolean&nbsp;debugModeEnabled)</pre>
<div class="block">Sets whether to enable outputting verbose logs for the IMA extension and IMA SDK. The default
 value is <code>false</code>. This setting is intended for debugging only, and should not be
 enabled in production applications.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>debugModeEnabled</code> - Whether to enable outputting verbose logs for the IMA extension and
     IMA SDK.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This builder, for convenience.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>ImaSdkSettings.setDebugMode(boolean)</code></dd>
</dl>
</li>
</ul>
<a id="build()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre class="methodSignature">public&nbsp;<a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader</a>&nbsp;build()</pre>
<div class="block">Returns a new <a href="ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima"><code>ImaAdsLoader</code></a>.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
